[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
RENAME SEXP1,SEXP2
Function
Rename (or move) a file.
Syntax
RENAME old,new
old - A string expression with the old path and/or file name.
new - A string expression with the new path and/or file name.
Remarks
Similar to how the RENAME command works from the DOS prompt, this
statement will take a file and give it a new name. Unlike the RENAME
command, RENAME will not accept wildcards in the old or new parameters.
Also, it doesn't require that the old path and the new path be the same
(the drive letters must match, but the paths need not), so it may be used
to move files from one location to another on a single drive. So, you
could use it to move a file from C:\PCB\NODE1 to C:\PCB\NODE2 (renaming
it at the same time if you wish), but you couldn't use it to move a file
from C:\PCB\NODE1 to D:\WORK\NODE1.
Examples
' Swap the PCBOARD DAT & NXT files
RENAME "PCBOARD.DAT","PCBOARD.TMP"
RENAME "PCBOARD.NXT","PCBOARD.DAT"
RENAME "PCBOARD.TMP","PCBOARD.NXT"
' Move the file to the backup directory
RENAME "PPE.LOG","LOGBAK\"+I2S(DATE()*86400+TIME(),36)
See Also:
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson